package org.wxd.bi.po;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.wxd.batis.struct.DbColumn;
import org.wxd.batis.struct.DbTable;
import org.wxd.lang.save.ObjectBase;

import java.io.Serializable;

/**
 * 用户信息
 *
 * @author: Troy.Chen(無心道, 15388152619)
 * @version: 2021-10-21 12:37
 **/
@DbTable(comment = "用户信息")
public class UserInfo extends ObjectBase implements Serializable {

    private static final long serialVersionUID = 1L;
    private static final Logger log = LoggerFactory.getLogger(UserInfo.class);
    /**
     *
     */
    @DbColumn(key = true, comment = "编号")
    private long userId;
    /**
     *
     */
    @DbColumn(unique = true, comment = "账号")
    private String userName;
    /**
     * 存储md5值
     */
    @DbColumn(comment = "密码")
    private String userPwd;
    @DbColumn(comment = "是否是管理员")
    private boolean admin;
    @DbColumn(comment = "创建时间")
    private long createTime;
    @DbColumn(comment = "最后登录时间")
    private long lastLoginTime;

    public long getUserId() {
        return userId;
    }

    public UserInfo setUserId(long userId) {
        this.userId = userId;
        return this;
    }

    public String getUserName() {
        return userName;
    }

    public UserInfo setUserName(String userName) {
        this.userName = userName;
        return this;
    }

    /**
     * md5的值
     *
     * @return
     */
    public String getUserPwd() {
        return userPwd;
    }

    /**
     * md5的值
     *
     * @param userPwd
     * @return
     */
    public UserInfo setUserPwd(String userPwd) {
        this.userPwd = userPwd;
        return this;
    }

    public boolean isAdmin() {
        return admin;
    }

    public UserInfo setAdmin(boolean admin) {
        this.admin = admin;
        return this;
    }

    public long getCreateTime() {
        return createTime;
    }

    public UserInfo setCreateTime(long createTime) {
        this.createTime = createTime;
        return this;
    }

    public long getLastLoginTime() {
        return lastLoginTime;
    }

    public UserInfo setLastLoginTime(long lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
        return this;
    }
}
